package cn.xiaohuodui.rest;

import cn.xiaohuodui.service.TopicService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * Created by TR on 2018/4/3.
 */
@RestController
@RequestMapping("/wx/topic")
public class TopicApi {

    @Autowired
    TopicService topicService;

    /**
     * 专题详情
     */
//    @RequestMapping("detail")
//    public Object detail(Integer id) {
//        if(id == null){
//            return ResponseUtil.fail402();
//        }
//
//        LitemallTopic topic = topicService.findById(id);
//        return ResponseUtil.ok(topic);
//    }
//
//    /**
//     * 相关专题
//     */
//    @RequestMapping("related")
//    public Object related(Integer id) {
//        if(id == null){
//            return ResponseUtil.fail402();
//        }
//
//        List<LitemallTopic> topicRelatedList = topicService.queryRelatedList(id, 0, 4);
//        return ResponseUtil.ok(topicRelatedList);
//    }
}
